import request from '@/utils/request'

// 查询考试学员列表
export function listScore_ex_exam_student(query) {
    return request({
        url: '/score/score_ex_exam_student/list',
        method: 'get',
        params: query
    })
}

// 查询考试下已添加的考试学员id列表
export function check_ids(examId) {
    return request({
        url: '/score/score_ex_exam_student/check-ids/'+examId,
        method: 'get',
    })
}

// 查询考试学员详细
export function getScore_ex_exam_student(id) {
    return request({
        url: '/score/score_ex_exam_student/' + id,
        method: 'get'
    })
}

// 新增考试学员
export function addScore_ex_exam_student(data) {
    return request({
        url: '/score/score_ex_exam_student',
        method: 'post',
        data: data
    })
}


// 批量新增考试学员
export function batch_add(examId,userIds) {
    return request({
        url: '/score/score_ex_exam_student/batch-add',
        method: 'post',
        data: {examId:examId,userIdList:userIds}
    })
}

// 修改考试学员
export function updateScore_ex_exam_student(data) {
    return request({
        url: '/score/score_ex_exam_student',
        method: 'put',
        data: data
    })
}

// 删除考试学员
export function delScore_ex_exam_student(id) {
    return request({
        url: '/score/score_ex_exam_student/' + id,
        method: 'delete'
    })
}

// 根据考试编号和学员编号集合批量删除考试学员
export function batch_remove_by_examId(examId,userIds) {
    return request({
        url: '/score/score_ex_exam_student/batch-remove-by-examId',
        method: 'delete',
        data: {examId:examId,userIdList:userIds}
    })
}
